public class Student {
    // 学生类属性
    private String name;
    private String ID;
    private String className;
    private String gender;
    private int age;
    private String personality;

    // 构造函数
    public Student(String name, String ID, String className, String gender, int age, String personality) {
        this.name = name;
        this.ID = ID;
        this.className = className;
        this.gender = gender;
        this.age = age;
        this.personality = personality;
    }

    // 获得姓名
    public String getName() {
        return name;
    }

    // 获得学号
    public String getID() {
        return ID;
    }

    // 获得班级
    public String getClassName() {
        return className;
    }

    // 获得性别
    public String getGender() {
        return gender;
    }

    // 获得年龄
    public int getAge() {
        return age;
    }

    // 获得性格
    public String getPersonality() {
        return personality;
    }

    // 信息概要
    public String infoSummary() {
        return "大家好！我的姓名是" + name + ", 学号是" + ID + ", 班级是" + className +
                ", 性别是" + gender + ", 年龄为" + age + "岁, 我的性格是" + personality;
    }

    public static void main(String[] args) {
// 创建3个学生类对象
        Student student1 = new Student("小蓝", "202330163001", "地信1班", "男", 18, "intj");
        Student student2 = new Student("小红", "202330163002", "地信2班", "女", 19, "infp");
        Student student3 = new Student("小绿", "202330163003", "地信3班", "男", 20, "enfj");

// 输出他们的信息概要
        System.out.println(student1.infoSummary());
        System.out.println(student2.infoSummary());
        System.out.println(student3.infoSummary());
    }
}
